fin = File.new(ARGV[0] ? ARGV[0] : "ratings.txt", "r")

$i = 1;

htmlRatings = File.new(ARGV[1] ? ARGV[1] : "ratings.html", "w")
htmlRatings << "<table width='160'>";
htmlRatings << "<tr><td width='10'>&nbsp;</td><td  width='100'><b>Nick</b></td><td  width='50'><b>Rating</b></td></tr>";
while(line = fin.gets)	
	if(/^(.+?)\s+([\d.]+)/.match(line))
		htmlRatings << "<tr><td>#{$i}</td><td>#{$1}</td><td>#{$2.to_f.round}</td></tr>";
		$i+=1;
	end
end
htmlRatings << "</table>";
fin.close
htmlRatings.close
